﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DevMango_Core
{
    public partial class frmCore : Form
    {
        public frmServerExplorer frmSE = new frmServerExplorer();

        public frmCore()
        {
            InitializeComponent();
        }

        private void frmCore_Load(object sender, EventArgs e)
        {
            frmSE.Hide();
        }

        private void connectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmConnect frmC = new frmConnect();
            frmC.frmSE = frmSE;
            
            frmC.ShowDialog(this);
        }

        private void serverExplorerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSE.MdiParent = this;
            frmSE.Visible = !(frmSE.Visible);
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void frmCore_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
    }
}
